package com.asset.modules.budget.model;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 
 * </p>
 *
 * @author asset
 * @since 2020-09-02
 */
@Data
//@EqualsAndHashCode(callSuper = false)
//@Accessors(chain = true)
@ApiModel(value ="预算表数据,公司名称与编码、预算名称与编码为非必填字段")
public class Budget extends Model<Budget> {

    private static final long serialVersionUID = 1L;

    /**
     * 序号
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 上一级预算ID
     */
    private String formerId;

    /**
     * 预算编码
     */
    @ExcelProperty(value ={"财年"},index =1)
    private String fiscalYear;

    /**
     * 区域ID
     */
    @ExcelIgnore
    private String companyId;

    /**
     * 区域编码
     */
    @ExcelIgnore
    private String companyCode;

    /**
     * 区域名称
     */
    @ExcelProperty(value = {"区域名称"}, index = 2)
    private String companyName;

    /**
     * 区域预算
     */
    private String companyBudget;


    /**
     * 公司ID
     */
    private String projectId;

    /**
     * 公司编码
     */

    private String projectCode;

    /**
     * 项目名称
     */
    @ExcelProperty(value = {"公司名称"}, index=3)
    private String projectName;

    /**
     * 区域预算
     */
    @ExcelProperty(value = {"已用预算"}, index = 4)
    private double expenditure;

    /**
     * 公司总预算
     */
    @ExcelProperty(value = {"公司预算"}, index = 5)
    private double projectBudget;



    /**
     * 预算余额
     */
    @ExcelProperty(value = {"预算余额"}, index = 6)
    private double budgetBalance;

    /**
     * 平台预算
     */
    @ExcelProperty(value = {"分项预算(W)", "平台"}, index = 7)
    private double platformBudget;

    /**
     * 项目部预算
     */
    @ExcelProperty(value = {"分项预算(W)", "项目部"}, index = 8)
    private double mngBudget;

    /**
     * 营销预算
     */
    @ExcelProperty(value = {"分项预算(W)", "营销"}, index = 9)
    private double saleBudget;

    /**
     * 房修中心预算
     */
    @ExcelProperty(value = {"分项预算(W)", "房修中心"}, index = 10)
    private double repairBudget;


    /**
     * 创建人
     */
    @ExcelProperty(value = {"创建人"}, index = 11)
    private String createUser;


    /**
     * 预算类型: 1 为省集团预算  2 为区域预算  3 为项目公司预算
     */
    private String type;


    /**
     * 更新时间
     */
    @ExcelIgnore
    private LocalDateTime updateTime;

    /**
     * 创建时间
     */
    @DateTimeFormat("yyyy-MM-dd")
    @ExcelIgnore
    private LocalDateTime createTime;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
